<template>
	<view :class="isshow?'isding':''">
		<view class="top">
			<view class="top_img">
				<image src="/static/user/f1.png" mode=""></image>
				<view class="abs">
					<swiper :autoplay="true" vertical circular :interval="3000" :duration="1000">
						<swiper-item v-for="(item,index) in swiperList" :key="index">
							<view class="swiper-item">
								{{item.userName}}刚刚免费领取了{{item.couponName}}消费券
							</view>
						</swiper-item>
					</swiper>
				</view>
			</view>
			<view class="cardflex">
				<view class="items" v-for="(item,index) in juanList" :key="index" @click="dclick(item,index)">
					<image v-if="item.active" src="/static/user/f2.png" mode=""></image>
					<image v-else src="/static/user/f3.png" mode=""></image>
					<view class="abs">
						<view class="t1">邀请<span>{{index+1}}</span>人</view>
						<view class="t2">￥<span>{{item.amount}}</span></view>
						<view class="b" :style="{background:item.active?'':'#C9C9C9'}">
							下单立得
						</view>
					</view>
				</view>
			</view>
			<view class="btnflex">
				<view class="btn1" @click="opens">
					分享海报
				</view>
				<button class="btn2" open-type="share">立即邀请</button>
			</view>
			<view class="test">
				需邀请{{uindex+1}}位新用户下单成功
			</view>
		</view>
		<view class="block_1">
			<view class="title">
				<view class="t1">
					邀请记录
				</view>
				<view class="t2 flex_b" @click="pagerecord">
					<view class="">
						查看更多
					</view>
					<uni-icons color="#979797" type="right" size="16"></uni-icons>
				</view>
			</view>
			<view class="">
				<view class="box_flex">
					<view class="btn" :class="istype==1?'b1':''" @click="changetype(1)">我发起的</view>
					<view class="btn " :class="istype==2?'b1':''" @click="changetype(2)">我助力的</view>
				</view>
				<view class="" v-if='istype == 1 &&uuList.length!=0'>
					<view class="ites "
					 :class="item.success==0?'ites':'itesact'"
					 v-for="(item,index) in uuList" :key="index">
						<view class="ites_t">
							<view class="">下单成功立减{{item.couponAmount}}元</view>
							<view class="ites_t_r">{{item.createTime}} 发起</view>
						</view>
						<view class="imgs">
							<view class="" >
								<image v-for="i in item.infoList" :key="i" 
								:src="i.createUserHead?i.createUserHead:'/static/toux.png'" mode=""></image>
								<image v-for="img in (item.userCount-item.infoList.length)" :key="img" src="../static/user/f9.png" mode=""></image>
							</view>
							
							<view class="imgs_r">
								<span v-if="item.success == '0'">等待好友助力</span>
								<span v-else>好友助力成功</span>
							</view>
						</view>
					</view>
				</view>
				<view class="ites itesact" v-if='istype == 2 &&uuList.length!=0'>
					<view class="" v-for="(item,index) in uuList" :key="index">
						<view class="ites_t" >
							<view class="">发起人</view>
							<view class="ites_t_r">{{item.createTime}} 助力</view>
						</view>
						<view class="imgs">
							<view class="" style="display: flex;align-items: center;">
								<image :src="item.inviteUserHead?item.inviteUserHead:'/static/toux.png'" mode=""></image>
								<view class="" style="color: #000;font-size: 28rpx;margin-left: 16rpx;">
									{{item.inviteUserName}}
								</view>
							</view>
							<view class="imgs_r">
								助力成功
							</view>
						</view>
					</view>
				</view>
				<view class="kong" v-if="uuList.length == 0">
					<image src="/static/user/f4.png" mode=""></image>
					<view class="">
						尚无邀请记录
					</view>
				</view>
			</view>
		</view>
		<view class="block_2">
			<view class="title">
				邀请好友，可得奖励如下
			</view>
			<view class="imgflex">
				<view class="its">
					<image src="../static/user/f5.png" mode=""></image>
					<view class="">
						选择奖励
					</view>
				</view>
				<image src="../static/user/frig.png" mode=""></image>
				<view class="its">
					<image src="../static/user/f6.png" mode=""></image>
					<view class="">
						邀请好友
					</view>
				</view>
				<image src="../static/user/frig.png" mode=""></image>
				<view class="its">
					<image src="../static/user/f7.png" mode=""></image>
					<view class="">
						邀请成功
					</view>
				</view>
			</view>
			<view class="tes">
				<view class="">
					即可获得
				</view>
				<image src="../static/user/fbom.png" mode=""></image>
			</view>
			<view class="flex_1">
				<view class="its" v-for="(item,index) in juanList" :key="index">
					<image src="/static/user/f8.png" mode=""></image>
					<view class="test">
						<span>￥</span>{{item.amount}}
					</view>
				</view>
			</view>
		</view>
		<view class="block_3">
			<view class="title">
				活动规则
			</view>
			<view class="">
				<view class="test">
					<view class="y"></view>
					<view class="t">
						邀请1位新用户下单且成功取袋后，即可获得【下单立减3元券】；
						邀请2位新用户下单且成功取袋后，即可获得【下单立减7元券】；
						邀请3位新用户下单且成功取袋后，即可获得一张【下单立减10元券】；
					</view>
				</view>
				<view class="test">
					<view class="y"></view>
					<view class="t">
						每位新用户只可参与助力1次；同一手机号微信号、伊可库账号、移动设备、经过授权的身份标识信息，均视为同一用户； </view>
				</view>
				<view class="test">
					<view class="y"></view>
					<view class="t">
						每位新用户只能参与一项拉新活动，如参与助力活动后，不能再参与其他拉新送券活动；每个用户发起同一任务次数不设限；但伊可库有权根据运营情况进行调整； </view>
				</view>
				<view class="test">
					<view class="y"></view>
					<view class="t">
						活动不累积，奖品单次结算； </view>
				</view>
				<view class="test">
					<view class="y"></view>
					<view class="t">
						消费券到账后，请尽快使用，过期后不予延期或补发； </view>
				</view>
				<view class="test">
					<view class="y"></view>
					<view class="t">
						此活动奖励的平台消费券具体使用规则可在【我的】-【消费券】里查看； </view>
				</view>
				<view class="test">
					<view class="y"></view>
					<view class="t">
						在参与活动过程中，如果出现作弊行为(如批量注册、虚假分享、虚假下单等)伊可库有权终止用户发起的任务。有权取消此用户在活动中获得的绿色消费券；
					</view>
				</view>
				<view class="test">
					<view class="y"></view>
					<view class="t">
						伊可库有权根据运营情况对活动进行调整或暂停，如给您带来不便敬请谅解。
					</view>
				</view>
			</view>
		</view>
		<uni-popup @change="popchange" ref="popup" type="center">
			<view class="popup">
				<view class="popimg">
					<image :src="imgs" mode=""></image>
					<view class="btn" @click="saveImage">
						保存
					</view>
				</view>
				<view class="icon" @click="close">
					<uni-icons size="34" color="#fff" type="close"></uni-icons>
				</view>
			</view>
		</uni-popup>
		<canvas v-if='isshow' canvas-id="myCanvas" :style="{ width: canvasWidth, height: canvasHeight }"></canvas>
	</view>
</template>

<script>
	import {
		inviteRegister,
		inviteList,
		inviteQuery,
		inviteQueryYq,
		yqList,
		zlList
	} from '@/common/http.api.js';
	export default {
		data() {
			return {
				swiperList: [],
				juanList: [],
				uindex: 0,
				params: {
					couponId: '',
					userCount: 1 //需要邀请的用户数量
				},
				uuList: [],


				istype: 1,
				canvasWidth: 375, //画布宽度
				canvasHeight: 812, //画布高度
				ratio: 0, //计算UI设计稿和你手机的屏幕宽度比例（例如UI设计稿是750宽度 你手机是350宽度 比例就是2  那么你画布画图时候 所有的尺寸大小、宽高、位置、定位左右上下都需要除以 / 比例2 ）
				widths: '',
				heights: '',
				imgs: '',
				isshow: false,
				myObj: {
					bgImg: getApp().globalData.WEBIMG + '/bcg.png',
					juan: getApp().globalData.WEBIMG + '/juan.png',
					ren: getApp().globalData.WEBIMG + '/ren.png',
					price:0
				}
			};
		},

		onLoad() {
			let that = this
			uni.getSystemInfo({
				success: res => {
					console.log(res);
					// res.screenWidth 设备宽度
					that.canvasWidth = res.screenWidth + 'px'
					that.widths = res.screenWidth
					that.ratio = 750 / res.screenWidth
					that.canvasHeight = (that.widths / 375) * 812 + 'px'
					that.heights = (that.widths / 375) * 812
				}
			})
			inviteRegister({}).then(res=>{
				this.myObj.price= res.data.amount
			})
			inviteList({
				pageNum: 1,
				pageSize: 100
			}).then(res => {
				this.swiperList = res.data
			})
			inviteQuery({}).then(res => {
				res.data.forEach(item => {
					item.active = false
				})
				res.data[0].active = true
				this.params.couponId = res.data[0].id
				this.juanList = res.data
			})
			yqList({}).then(res => {
				this.uuList = res.rows.splice(0,2)
			})
		},
		async onShareAppMessage(res) {
			const saveRes = await inviteQueryYq(this.params)
			if (saveRes.code == 200) {
				return {
					title: '组队领优惠券！',
					imageUrl: '/static/user/f1.png',
					path: `/mypage/newfriend?inviteId=${saveRes.data.id}`,
				}
			}
			// if (res.from === 'button') { // 来自页面内分享按钮
			// 	console.log(res)
			// }

		},
		methods: {
			close() {
				this.$refs.popup.close()
			},
			downImgUrl() {
				let that = this
				uni.getImageInfo({
					src: that.myObj.bgImg,
					success: function(res) {
						that.myObj.bgImg = res.path
						uni.getImageInfo({
							src: that.myObj.juan,
							success: function(res) {
								that.myObj.juan = res.path
								uni.getImageInfo({
									src: that.myObj.ren,
									success: function(res) {
										that.myObj.ren = res.path
										that.drawPageImg()
									}
								});
							}
						});
					}
				});

			},
			opens() {
				let that = this
				uni.showLoading({
					title: '海报生成中...'
				});
				this.isshow = true
				this.downImgUrl()
			},
			popchange(e) {
				this.isshow = e.show
			},
			drawPageImg() {
				let _this = this
				// 生成画布
				const ctx = uni.createCanvasContext('myCanvas', _this)
				// // 背景图
				ctx.drawImage(_this.myObj.bgImg, //图像资源
					(0 / _this.ratio), //图像的左上角在目标canvas上 X 轴的位置
					(0 / _this.ratio), //图像的左上角在目标canvas上 Y 轴的位置
					(750 / _this.ratio), //在目标画布上绘制图像的宽度
					(1624 / _this.ratio) //在目标画布上绘制图像的高度
				)
				ctx.drawImage(_this.myObj.juan, //图像资源
					(60 / _this.ratio), //图像的左上角在目标canvas上 X 轴的位置
					(538 / _this.ratio), //图像的左上角在目标canvas上 Y 轴的位置
					(630 / _this.ratio), //在目标画布上绘制图像的宽度
					(350 / _this.ratio) //在目标画布上绘制图像的高度
				)
				ctx.drawImage(_this.myObj.ren, //图像资源
					(218 / _this.ratio), //图像的左上角在目标canvas上 X 轴的位置
					(584 / _this.ratio), //图像的左上角在目标canvas上 Y 轴的位置
					(314 / _this.ratio), //在目标画布上绘制图像的宽度
					(70 / _this.ratio) //在目标画布上绘制图像的高度
				)
				_this.ctxText(ctx,
					'50px bold,PingFang SC',
					'center',
					'#242424',_this.myObj.price, 375 / _this.ratio, 780 / _this.ratio)
				_this.ctxText(ctx,
					'16px Arial,PingFang SC',
					'center',
					'#242424',
					'消费券(元)', 375 / _this.ratio, 830 / _this.ratio)
				_this.ctxText(ctx,
					'16px Arial,PingFang SC',
					'center',
					'#242424',
					'消费券(元)', 375 / _this.ratio, 830 / _this.ratio)
				_this.ctxCircular(ctx, '../static/rwm1.jpg', (256 / _this.ratio), (1254 / _this.ratio), (240 / _this.ratio),
					(240 / _this.ratio), 6)
				_this.ctxRectangle(ctx, 0, 1542 / _this.ratio, (750 / _this.ratio), (80 / _this.ratio), 0,
					'rgba(0,0,0,0.39)')
				_this.ctxText(ctx,
					'14px Arial,PingFang SC',
					'center',
					'#ffffff',
					'长按识别进入伊可库小程序，领取新人专属福利', 375 / _this.ratio, 1590 / _this.ratio)
				// 渲染画布
				ctx.draw(false, (() => {
					setTimeout(() => {
						uni.canvasToTempFilePath({
							canvasId: 'myCanvas',
							destWidth: _this.canvasWidth * 2, //展示图片尺寸=画布尺寸1*像素比2
							destHeight: _this.canvasHeight * 2,
							quality: 1,
							fileType: 'jpg',
							success: (res) => {
								uni.hideLoading()
								console.log('通过画布绘制出的图片--保存的就是这个图', res.tempFilePath)
								_this.imgs = res.tempFilePath
								this.$refs.popup.open()
							},
							fail: function(error) {
								console.log(error);
								uni.hideLoading()
								uni.showToast({
									icon: 'none',
									position: 'bottom',
									title: "绘制图片失败", // res.tempFilePath
								})
							}
						}, _this)

					}, 100)
				})())
			},
			saveImage() {
				uni.saveImageToPhotosAlbum({
					filePath: this.imgs,
					success: function() {
						uni.showToast({
							icon: 'none',
							position: 'bottom',
							title: "已保存到系统相册",
						})
					},
					fail: function(error) {
						uni.showModal({
							title: '提示',
							content: '若点击不授权，将无法使用保存图片功能',
							cancelText: '不授权',
							cancelColor: '#999',
							confirmText: '授权',
							confirmColor: '#f94218',
							success(res) {
								console.log(res)
								if (res.confirm) {
									// 选择弹框内授权
									uni.openSetting({
										success(res) {
											console.log(res.authSetting)
										}
									})
								} else if (res.cancel) {
									// 选择弹框内 不授权
									console.log('用户点击不授权')
								}
							}
						})
					}
				})
			},
			pagerecord() {
				uni.navigateTo({
					url: '/mypage/feiendrecord'
				})
			},
			//发起 助力
			changetype(type) {
				this.istype = type
				this.uuList = []
				if (type == 1) {
					yqList({}).then(res => {
						this.uuList = res.rows.splice(0,2)
					})
				} else {
					zlList({}).then(res => {
						this.uuList = res.rows.splice(0,2)
					})
				}
			},
			//点击切换
			dclick(item, index) {
				this.params.couponId = item.id
				this.params.userCount = index + 1
				this.juanList.forEach(item => {
					item.active = false
				})
				item.active = true
				this.uindex = index
			},
			//画一个带圆角矩形
			ctxCircular(ctx, img, x, y, width, height, r, shadow) {
				ctx.beginPath() //开始绘制
				ctx.save() //保存(canvas)状态
				ctx.moveTo(x + r, y)
				ctx.lineTo(x + width - r, y)
				ctx.arc(x + width - r, y + r, r, Math.PI * 1.5, Math.PI * 2)
				ctx.lineTo(x + width, y + height - r)
				ctx.arc(x + width - r, y + height - r, r, 0, Math.PI * 0.5)
				ctx.lineTo(x + r, y + height)
				ctx.arc(x + r, y + height - r, r, Math.PI * 0.5, Math.PI)
				ctx.lineTo(x, y + r)
				ctx.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5)
				if (shadow == 1) {
					ctx.shadowBlur = 20; // 模糊效果程度的
					ctx.shadowColor = 'red'; // 阴影颜色
				}
				ctx.fill() //对当前路径中的内容进行填充
				ctx.clip() //从原始画布中剪切任意形状和尺寸
				ctx.closePath() //关闭一个路径
				ctx.drawImage(img, x, y, width, height);
				ctx.restore() //恢复(canvas)状态
			},
			//画一个矩形也就是整个海报的背景
			ctxRectangle(ctx, x, y, width, height, r, gnt) {
				ctx.beginPath()
				ctx.save() //保存状态
				ctx.moveTo(x + r, y)
				ctx.lineTo(x + width - r, y)
				ctx.arc(x + width - r, y + r, r, Math.PI * 1.5, Math.PI * 2)
				ctx.lineTo(x + width, y + height - r)
				ctx.arc(x + width - r, y + height - r, r, 0, Math.PI * 0.5)
				ctx.lineTo(x + r, y + height)
				ctx.arc(x + r, y + height - r, r, Math.PI * 0.5, Math.PI)
				ctx.lineTo(x, y + r)
				ctx.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5)
				ctx.fillStyle = gnt
				ctx.fill() //对当前路径中的内容进行填充
				ctx.closePath() //关闭一个路径
			},
			ctxText(ctx, textFont, textAlign, textFillStyle, textName, x, y) {
				ctx.beginPath()
				ctx.save() //保存状态
				//字体
				ctx.font = textFont,
					//字体样式
					ctx.textAlign = textAlign
				//字体颜色
				ctx.fillStyle = textFillStyle
				//填充字体
				ctx.fillText(textName, x, y)
			},
		}
	}
</script>

<style lang="scss">
	page {
		background: #FBFBFB;
	}

	.isding {
		overflow: hidden;
		height: 100vh;
	}

	.popup {
		width: 600rpx;

		.popimg {
			background: #FFFFFF;
			padding-bottom: 10rpx;

			image {
				width: 600rpx;
				height: 1120rpx;
				font-size: 0%;
			}
		}

		.btn {
			width: 240rpx;
			height: 60rpx;
			background: #000000;
			border-radius: 8rpx 8rpx 8rpx 8rpx;
			margin: 15rpx auto;
			text-align: center;
			color: #FFFFFF;
			line-height: 60rpx;
		}

		.icon {
			text-align: center;
			margin: 20rpx auto;
		}
	}

	.top {
		width: 710rpx;
		background: red;
		box-sizing: border-box;
		margin: 40rpx auto 20rpx;
		border-radius: 40rpx;
		padding-bottom: 10rpx;
		background: #ffffff;

		.test {
			font-family: PingFang SC, PingFang SC;
			font-weight: 500;
			font-size: 28rpx;
			color: #979797;
			margin: 30rpx auto;
			text-align: center;
		}
	}

	.top_img {
		width: 710rpx;
		height: 420rpx;
		margin: 0rpx auto;
		position: relative;

		image {
			width: 710rpx;
			height: 420rpx;
		}

		.abs {
			width: 668rpx;
			height: 48rpx;
			background: rgba(255, 255, 255, 0.4);
			border-radius: 20rpx 20rpx 20rpx 20rpx;
			position: absolute;
			bottom: 10rpx;
			left: 21rpx;

			swiper {
				height: 48rpx;
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 20rpx;
				color: #000000;
				line-height: 48rpx;
				text-align: center;
			}
		}
	}

	.cardflex {
		display: flex;
		padding: 40rpx 20rpx;
		align-items: center;
		justify-content: space-between;
		box-sizing: border-box;

		.items {
			width: 200rpx;
			height: 260rpx;
			position: relative;

			image {
				width: 200rpx;
				height: 260rpx;
			}

			.abs {
				width: 200rpx;
				height: 260rpx;
				position: absolute;
				top: 0%;
				text-align: center;
				padding: 20rpx;
				box-sizing: border-box;

				span {
					font-family: 'DINB';
					margin: 0rpx 10rpx;
					color: #29A85C;
				}

				.t1 {
					font-family: PingFang SC, PingFang SC;
					font-weight: bold;
					font-size: 28rpx;
					color: #000000;

					span {
						font-size: 48rpx;
					}
				}

				.t2 {
					font-family: PingFang SC, PingFang SC;
					font-weight: bold;
					font-size: 32rpx;
					color: #29A85C;
					line-height: 70rpx;

					span {
						font-size: 80rpx;
					}
				}

				.b {
					margin-top: 20rpx;
					width: 144rpx;
					height: 52rpx;
					background: #000000;
					border-radius: 12rpx 12rpx 12rpx 12rpx;
					font-family: PingFang SC, PingFang SC;
					font-weight: 500;
					font-size: 26rpx;
					color: #FFFFFF;
					line-height: 52rpx;
				}
			}
		}
	}

	.block_1 {
		width: 710rpx;
		background: #ffffff;
		border-radius: 40rpx 40rpx 40rpx 40rpx;
		margin: 20rpx auto;
		padding: 42rpx 20rpx 20rpx;
		box-sizing: border-box;

		.title {
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding-bottom: 20rpx;
			border-bottom: 1px solid #eee;

			.t1 {
				font-family: PingFang SC, PingFang SC;
				font-weight: bold;
				font-size: 40rpx;
				color: #000000;
			}

			.t2 {
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 28rpx;
				color: #979797;
			}
		}

		.box_flex {
			display: flex;
			justify-content: space-evenly;
			margin: 40rpx auto;

			.btn {
				width: 212rpx;
				height: 76rpx;
				background: #F3F3F3;
				border-radius: 8rpx 8rpx 8rpx 8rpx;
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 28rpx;
				color: #000000;
				line-height: 76rpx;
				text-align: center;
			}

			.b1 {
				color: #FFFFFF;
				background: #000000;
			}



		}

		.ites {
			height: 160rpx;
			background: #000000;
			border-radius: 20rpx 20rpx 20rpx 20rpx;
			padding: 26rpx 20rpx;
			box-sizing: border-box;
			color: #ffffff;
			font-family: PingFang SC, PingFang SC;
			font-weight: 500;
			margin: 20rpx auto;

			.ites_t {
				font-size: 28rpx;
				color: #FFFFFF;
				display: flex;
				align-items: center;
				justify-content: space-between;
			}

			.ites_t_r {
				font-size: 20rpx;
				color: #979797;
				line-height: 23rpx;
			}

			.imgs {
				display: flex;
				align-items: center;
				justify-content: space-between;
				margin-top: 10rpx;
				image {
					width: 60rpx;
					height: 60rpx;
					border-radius: 30rpx;
					margin-right: 15rpx;
				}
				.imgs_r {
					font-family: PingFang SC, PingFang SC;
					font-weight: 500;
					font-size: 20rpx;
					color: #29A85C;
					line-height: 23rpx;
				}
			}
		}

		.itesact {
			background: #F3F3F3;
			.ites_t {
				color: #000;
			}
		}

		.kong {
			text-align: center;
			font-family: PingFang SC, PingFang SC;
			font-weight: bold;
			font-size: 36rpx;
			color: #000000;
			image {
				width: 228rpx;
				height: 228rpx;
			}
		}
	}

	.block_2 {
		width: 710rpx;
		background: #FFFFFF;
		border-radius: 40rpx 40rpx 40rpx 40rpx;
		padding: 36rpx 20rpx;
		box-sizing: border-box;
		margin: 20rpx auto;

		.title {
			font-family: PingFang SC, PingFang SC;
			font-weight: bold;
			font-size: 40rpx;
			color: #000000;
			padding-bottom: 20rpx;
			border-bottom: 1px solid #eee;
		}

		.imgflex {
			display: flex;
			justify-content: space-evenly;
			align-items: center;
			margin: 32rpx auto;
			padding-bottom: 20rpx;
			border-bottom: 1px solid #eee;

			image {
				width: 26rpx;
				height: 26rpx;
			}

			.its {
				text-align: center;
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 28rpx;
				color: #000000;

				image {
					width: 64rpx;
					height: 64rpx;
				}
			}
		}

		.tes {
			font-family: PingFang SC, PingFang SC;
			font-weight: 800;
			font-size: 48rpx;
			color: #000000;
			text-align: center;

			image {
				width: 76rpx;
				height: 56rpx;
				margin: 16rpx;
			}
		}

		.flex_1 {
			display: flex;
			align-items: center;
			justify-content: space-evenly;

			.its {
				position: relative;
				width: 118rpx;
				height: 118rpx;

				image {
					width: 118rpx;
					height: 118rpx;
				}

				.test {
					position: absolute;
					top: 0%;
					width: 118rpx;
					height: 118rpx;
					font-family: 'DINB';
					font-weight: bold;
					font-size: 60rpx;
					color: #000000;
					line-height: 118rpx;
					text-align: center;

					span {
						font-size: 32rpx;
					}
				}
			}
		}
	}

	.block_3 {
		width: 710rpx;
		background: #FFFFFF;
		border-radius: 40rpx 40rpx 40rpx 40rpx;
		padding: 36rpx 20rpx;
		box-sizing: border-box;
		margin: 20rpx auto;

		.title {
			font-family: PingFang SC, PingFang SC;
			font-weight: bold;
			font-size: 40rpx;
			color: #000000;
			padding-bottom: 20rpx;
			border-bottom: 1px solid #eee;
		}

		.test {
			display: flex;
			margin: 20rpx auto;

			.y {
				width: 12rpx;
				height: 12rpx;
				background-color: #979797;
				border-radius: 6rpx;
				margin: 10rpx;
			}

			.t {
				flex: 1;
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 28rpx;
				color: #979797;
				line-height: 36rpx;
			}
		}

	}

	.btnflex {
		display: flex;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		text-align: center;
		line-height: 92rpx;
		justify-content: space-between;
		padding: 0rpx 20rpx;

		.btn1 {
			width: 240rpx;
			height: 92rpx;
			background: #F3F3F3;
			border-radius: 8rpx 8rpx 8rpx 8rpx;
			font-size: 30rpx;
			color: #000000;
		}

		.btn2 {
			width: 400rpx;
			height: 92rpx;
			background: #000000;
			border-radius: 8rpx 8rpx 8rpx 8rpx;
			font-size: 30rpx;
			color: #ffffff;
			line-height: 92rpx;
		}

	}
</style>